import java.util.Scanner;

class BinInsert {
    public int binInsert(int n, int m, int j, int i) {
        n = n ^ (m << i);
        return n;
    }
    // 4 8
    // 00000000 00000000 00000000 00010011
    // 00000000 00000000 00000100 00000000
    // 00000000 00000000 00000100 01001100
}


class Solution1 {
    public int uniquePathsWithObstacles(int[][] obstacleGrid) {
        int n = obstacleGrid.length, m = obstacleGrid[0].length;
        int[][] dp = new int[n][m];
        if (obstacleGrid[0][0] != 1) dp[0][0] = 1;
        for (int i = 1; i < n; i++) {
            if (obstacleGrid[i][0] == 1) dp[i][0] = 0;
            else dp[i][0] = dp[i - 1][0];
        }
        for (int i = 1; i < m; i++) {
            if (obstacleGrid[0][i] == 1) dp[0][i] = 0;
            else dp[0][i] = dp[0][i - 1];
        }
        for (int i = 1; i < n; i++) {
            for (int j = 1; j < m; j++) {
                if (obstacleGrid[i][j] == 1) dp[i][j] = 0;
                else dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        return dp[n - 1][m - 1];
    }
}

class Solution2 {
    public int jewelleryValue(int[][] frame) {
        int n = frame.length, m = frame[0].length;
        int[][] dp = new int[n+1][m+1];
        for(int i = 1; i<=n; i++) {
            for(int j = 1; j<=m; j++) {
                dp[i][j] = Math.max(dp[i-1][j],dp[i][j-1]) + frame[i-1][j-1];
            }
        }
        return dp[n][m];
    }
}

class Solution3 {
    public int minFallingPathSum(int[][] matrix) {
        int n = matrix.length, m = matrix[0].length;
        int[][] dp = new int[n+2][m+2];
        for(int i = 1; i<n; i++) {
            dp[i][0] = dp[i][m] = Integer.MAX_VALUE;
        }
        for(int i = 1; i<=n; i++) {
            for(int j = 1; j<=m; j++) {
                dp[i][j] = Math.min(Math.min(dp[i-1][j-1],dp[i-1][j]),dp[i-1][j+1]) + matrix[i-1][j-1];
            }
        }
        int ret = Integer.MAX_VALUE;
        for(int i = 1; i<=m; i++) {
            ret = Math.min(ret,dp[n][i]);
        }
        return ret;
    }
}

class Solution4 {
    public int minPathSum(int[][] grid) {
        int n = grid.length, m = grid[0].length;
        int[][] dp = new int[n+1][m+1];
        for(int i = 1; i<=n; i++) {
            dp[i][0] = Integer.MAX_VALUE;
        }
        for(int i = 1; i<=m; i++) {
            dp[0][i] = Integer.MAX_VALUE;
        }
        dp[0][1] = 0;
        for(int i = 1; i<=n; i++) {
            for(int j = 1; j<=m; j++) {
                dp[i][j] = Math.min(dp[i][j-1],dp[i-1][j]) + grid[i-1][j-1];
            }
        }

        for(int i = 1; i<=n; i++) {
            for(int j = 1; j<=m; j++) {
                System.out.print(dp[i][j]+" ");
            }
            System.out.println();
        }
        return dp[n][m];
    }
}

class Solution5 {
    public String truncateSentence(String s, int k) {
        int i = 0;
        while(k>0) {
            if(s.charAt(i) == ' ') {
                k--;
            }
            i++;
        }
        return s.substring(0,i);
    }
}

class Solution {
    public int removeDuplicates(int[] nums) {
        if(nums.length == 0) return 0;
        int i = 0, j = 1;
        while(j<nums.length) {
            if(nums[i] == nums[j]) {
                j++;
            }else {
                nums[++i] = nums[j];
            }
        }
        return i+1;
    }
}

class Main1 {
    public static void main2(String[] args) {
        int n = 1024, m = 19;
        for (int i = 32; i >= 0; i--) {
            System.out.print((m >> i) & 1);
        }
        System.out.println();
        for (int i = 32; i >= 0; i--) {
            System.out.print((n >> i) & 1);
        }
        n = n | m;
        System.out.println();
        for (int i = 32; i >= 0; i--) {
            System.out.print((n >> i) & 1);
        }
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = n / 2, j = n / 2;
        while (true) {
            while (!IsPrime(i)) {
                i--;
            }
            while (!IsPrime(j)) {
                j++;
            }
            if (i + j == n) {
                break;
            }
            if (i + j < n) {
                j++;
            } else {
                i--;
            }
        }
        System.out.println(i + "\n" + j);
    }

    public static boolean IsPrime(int n) {
        int k = (int) Math.sqrt(n);
        for (int i = 2; i <= k; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
}

public class Main {
    static int n,x;
    static int[] nums;
    static int[] sum;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt(); //宽度
        x = scanner.nextInt(); //天数
        nums = new int[n-1];
        sum = new int[n];
        for(int i = 0; i<n-1; i++) {
            nums[i] = scanner.nextInt();
        }

        //计算前缀和
        for(int i = 1; i<n; i++) {
            sum[i] = sum[i-1] + nums[i-1];
        }

        //二分
        int left = 1, right = n;
        while(left < right) {
            int mid = left + (right - left)/2;
            if(check(mid)) {
                right = mid;
            }else {
                left = mid + 1;
            }
            //System.out.println(left);
        }
        System.out.println(left);
    }

    public static boolean check(int len) {
        //任意一个长度为len的区间的高度和都要大于2x
        for(int i = len; i<n; i++) {
            if(sum[i] - sum[i-len] < 2*x) {
                return false;
            }
        }
        return true;
    }
}